package com.zw.stock_sell_storage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zw.stock_sell_storage.dto.PermissionDto;
import com.zw.stock_sell_storage.dto.RoleDto;
import com.zw.stock_sell_storage.mapper.PermissionMapper;
import com.zw.stock_sell_storage.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, PermissionDto> implements IPermissionService {
    @Autowired
    PermissionMapper permissionMapper;
    @Override
    public List<PermissionDto> queryPermissionByUserId(List<RoleDto> roleList) {
        return permissionMapper.selectPermissionByUserId(roleList);
    }

    @Override
    public List<PermissionDto> queryAllPermission() {

        return permissionMapper.selectList(null);
    }
}
